Skip to main content

Select

Selects the current paragraph.

Syntax

expression.Select();

expression - A variable that represents a ApiParagraph class.

Parameters

This method doesn't have any parameters.

Returns

boolean

Example

This example selects the paragraph.

let doc = editor.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("ONLYOFFICE Document Builder");
let result = paragraph.Select();
if (result === true) {
paragraph.SetItalic(true);
}